<?php

class Admin_IndexController extends My_Controller_Action {

    public function init() {
        $template_path = TEMPLATE_PATH . "/admin";
        $this->loadTemplate($template_path, 'template.ini', 'template');

        My_Auth_User::authenticate();
    }

    public function indexAction() {    	
        $categoryModel = new Admin_Model_Category();
        $articleModel = new Admin_Model_Article();

        $numCategory = $categoryModel->countItems();
        $numArticle = $articleModel->countItems();
        //$data = Zend_Session::destroy();

        var_dump($_SESSION['image']);
        //setcookie('cookieName', '123',  time() + 7200);
        
        //$cookie = new Zend_Http_Cookie('cookiename', '123', time() + 7200);
        $request = $this->getRequest();
        $cookieData = $request->getCookie('image');
        
        var_dump($cookieData);
        /**
         * 
        $request = new Zend_Controller_Request_Http();
        $myCookie = $request->getCookie('cookieName');
         * 
         */
       

        $this->view->numCategory = $numCategory;
        $this->view->numArticle = $numArticle;
    }

}